.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.comments-count {
    font-size: 1.2rem;
    color: #6c757d;
    margin-left: 20px;
}

.refresh-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.refresh-btn:hover {
    background-color: #45a049;
}

.comments-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.comment {
    padding: 15px 0;
    border-bottom: 1px solid #f1f1f1;
    animation: fadeIn 0.5s ease;
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    /*background-color: #3498db;*/
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.comment-author {
    font-weight: bold;
    color: #2c3e50;
}

.comment-time {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-left: 10px;
}

.comment-content {
    margin-left: 50px; /* 修改：统一缩进 */
    color: #34495e;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* 新增：回复信息行 */
.reply-info {
    margin-left: 50px; /* 修改：统一缩进 */
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

/* 新增：回复图标 */
.reply-icon {
    margin-right: 5px;
    color: #3498db;
}

.comment-actions {
    margin-left: 50px; /* 修改：统一缩进 */
    display: flex;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.action-btn:hover {
    background-color: #f5f5f5;
    color: #3498db;
}

.action-btn.liked {
    color: #e74c3c;
}

.action-btn.disliked {
    color: #3498db;
}

.reply-form {
    margin-left: 50px; /* 修改：统一缩进 */
    margin-top: 15px;
    display: none;
}

.reply-form.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.reply-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 10px;
    font-family: inherit;
}

.reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.reply-submit {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.reply-cancel {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* 修改：回复容器样式 */
.replies {
    margin-left: 50px; /* 修改：统一缩进 */
    margin-top: 15px;
    display: none;
}

.replies.expanded {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 新增：折叠/展开按钮 */
.toggle-replies {
    margin-left: 50px; /* 修改：统一缩进 */
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 0;
    margin-top: 10px;
}

.toggle-replies:hover {
    color: #2980b9;
}

.load-more-container {
    text-align: center;
    margin-top: 20px;
}

.load-more-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.load-more-btn:hover {
    background-color: #2980b9;
}

.load-more-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    background-color: #fadbd8;
    border-radius: 4px;
    margin: 20px 0;
}

.empty {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    /* 修改：移动端统一缩进 */
    .comment-content, .comment-actions, .reply-form, .toggle-replies, .reply-info {
        margin-left: 30px;
    }

    .replies {
        margin-left: 30px;
    }

    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .comment-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
}